import api from './http'
// 登录
export const loginApi = (params) => api.post('http://154.94.6.121/v1/user/login', params) // 登录


export const onSubmit = (params) => api.post('http://154.94.6.121/v1/user/list', params) // 用户列表
export const redactAdmin = (params) => api.patch('http://154.94.6.121/v1/user/upd', params) // 编辑用户
export const addAdmin = (params) => api.post('http://154.94.6.121/v1/user/add', params) // 新增用户
export const permissions = (params) => api.get(`http://154.94.6.121/v1/user/permissions/${params}`) // 获取账户权限
export const deleteAdmin = (params) => api.delete(`http://154.94.6.121/v1/user/del?ids=${params}`) // 删除用户 
export const addPermission = (params) => api.post('http://154.94.6.121/v1/user/addPermission', params, { headers: { 'Content-Type': '', } }) // 分配权限
export const userRight = (params) => api.put('http://154.94.6.121/v1/user/editUserPermission', params) // 修改用户权限

export const roleList = (params) => api.post('http://154.94.6.121/v1/role/list', params) // 角色列表
export const addRole = (params) => api.post('http://154.94.6.121/v1/role/add', params) // 添加角色 
export const updRole = (params) => api.patch('http://154.94.6.121/v1/role/upd', params) // 编辑角色 
export const deleteRole = (params) => api.delete(`http://154.94.6.121/v1/role/del?id=${params}`) // 删除角色
export const permissionsRole = (params) => api.get(`http://154.94.6.121/v1/role/permissions//${params}`) // 获取角色权限
export const userRightRole = (params) => api.put('http://154.94.6.121/v1/role/editRolePermissions', params) // 修改用户权限


export const menu = (params) => api.post('http://154.94.6.121/v1/menu/list', params) // 获取菜单列表
export const addAPI = (params) => api.post('http://154.94.6.121/v1/menu/add', params) // 添加api 
export const deletemenu = (params) => api.delete(`http://154.94.6.121/v1/menu/del?id=${params}`) // 删除api 
export const updMenu = (params) => api.patch('http://154.94.6.121/v1/menu/upd', params) // 编辑角色  

export const loglist = (params) => api.post('http://154.94.6.121/v1/log/list', params) // 获取日志列表


export const addStream = (params) => api.post('http://154.94.6.121/v1/live_stream/add', params) // 创建直播系统
export const getStreamList = (params) => api.post('http://154.94.6.121/v1/live_stream/list', params) // 获取直播系统列表
export const editStream = (params) => api.patch('http://154.94.6.121/v1/Live_stream/upd', params) // 修改系统
export const removeStream = (params) => api.post('http://154.94.6.121/v1/live_stream/del', params) // 删除系统



export const getLiveRole = (params) => api.post('http://154.94.6.121/v1/live_stream_role/list', params) // 获取直播系统前端角色列表
export const addLiveRole = (params) => api.post('http://154.94.6.121/v1/live_stream_role/add', params) // 添加直播系统，前端角色
export const updLiveRole = (params) => api.post('http://154.94.6.121/v1/live_stream_role/upd', params) // 编辑直播系统角色
export const delLiveRole = (params) => api.post('http://154.94.6.121/v1/live_stream_role/del', params) // 删除直播系统角色


export const getBotRole = (params) => api.post('http://154.94.6.121/v1/live_stream_robot/list', params) // 获取机器人列表
export const addBotRole = (params) => api.post('http://154.94.6.121/v1/live_stream_robot/add', params) // 添加机器人
export const updBotRole = (params) => api.post('http://154.94.6.121/v1/live_stream_robot/upd', params) // 编辑机器人
export const delBotRole = (params) => api.post('http://154.94.6.121/v1/live_stream_robot/del', params) // 删除机器人

export const messageList = (params) => api.post('http://154.94.6.121/v1/live_stream_msg_review/list', params) // 获取消息列表
export const updmessage = (params) => api.post('http://154.94.6.121/v1/live_stream_msg_review/check', params) // 消息审阅

export const addStreamHome = (params) => api.post('http://154.94.6.121/v1/room/add', params)
export const getStreamHomeList = (params) => api.post('http://154.94.6.121/v1/room/list', params) 
export const editStreamHome = (params) => api.post('http://154.94.6.121/v1/room/upd', params) 
export const removeStreamHome = (params) => api.post('http://154.94.6.121/v1/room/del', params) 

// addStreamHome,
// getStreamHomeList,
// editStreamHome,
// removeStreamHome,